<template>
<div>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :page-sizes="[5, 8, 10, 15]"
      :page-size="5"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
</div>
</template>

<script>
export default {
 // 组件名称
 name: 'demo',
 // 组件参数 接收来自父组件的数据
 props: ['total'],
 components: {},
 data () {
 return {}
 },
 computed: {},
 watch: {},
 methods: {
    handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
        this.$emit('changeSize',val)
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
        this.$emit('changeNum',val)
      }
},
 beforeCreate () {
 },
 created () {
 },
 beforeMount () {
 },
 mounted () {
 },
}
</script> 
<style scoped>

</style>
